<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>栏目管理</title> 
    
    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="/public/admin/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/public/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/admin/css/animate.css" rel="stylesheet">
    <link href="/public/admin/css/style.css?v=4.0.0" rel="stylesheet">
    <link href="/public/admin/css/ourstyle.css?v=4.0.0" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/public/webuploader/webuploader.css">

    <!-- 全局js -->
    <script src="/public/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/admin/js/bootstrap.min.js?v=3.3.5"></script>
    <!-- 自定义js -->
    <script src="/public/admin/js/content.js?v=1.0.0"></script>
    <script src="/public/admin/js/plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="/public/admin/js/article.js"></script> 
    <!-- jQuery Validation plugin javascript-->
    <script src="/public/admin/js/plugins/validate/jquery.validate.min.js"></script> 
    
    <script src="/public/admin/js/demo/form-validate-demo.js"></script>
    <script src="/public/admin/js/plugins/iCheck/icheck.min.js"></script>
     <!-- kindeditor -->
    <script src="/public/kindeditor/kindeditor-all-min.js"></script>
    <script src="/public/kindeditor/lang/zh-CN.js"></script>
    <!-- webuploader -->
     <script type="text/javascript" src="/public/webuploader/webuploader.nolog.js"></script>
    <!-- CKeditor -->
    <script src="/public/admin/plugins/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="/public/admin/plugins/ckfinder/ckfinder.js"></script>
</head>

<body class="fixed-sidebar full-height-layout gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>栏目内容</h5>
                </div>
                <div class="ibox-content">
                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#tab-1"> 基本信息</a></li>
                        <li class=""><a data-toggle="tab" href="#tab-2" style="display:none"> 栏目内容(英)</a>
                        </li>
                    </ul>
                    <br/>
                    <div class="row">
                        <form action="{:url('Article/categoryHandle')}" method="post" id="artkindFrom" class="form-horizontal">
                        <div class="tab-content">
                        <div id="tab-1" class="tab-pane active">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">父级栏目：</label>
                                <div class="col-sm-8">
                                    <select class="form-control" name="parent_id">
                                    <option value="0">顶级分类</option>
                                    <?php echo $cat_select ?>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">栏目名称：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="kind_name" minlength="2" type="text" value="{$cat_info.kind_name}" required="" aria-required="true">
                                </div>
                            </div>
                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">英文名称：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="e_kind_name" minlength="2" type="text" value="{$cat_info.e_kind_name}">
                                </div>
                            </div>
                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">栏目banner：</label>
                                <div class="col-sm-8">
                                    <div class="input-group uploder-container">
                                        <input type="text" class="form-control" name="banner_img" id="banner_img" value="{$cat_info.banner_img}" placeholder="请选择栏目banner"> 
                                        <span class="input-group-btn"> <button type="button" class="btn btn-primary filePicker">选择图片</button>
                                        </span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">栏目图标：</label>
                                <div class="col-sm-8">
                                    <div class="input-group">
                                        <input type="text" class="form-control" name="e_banner_img" id="e_banner_img" value="{$cat_info.e_banner_img}"> <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="BrowseServer('e_banner_img');">选择图片</button> </span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">Banner图片(手机)：</label>
                                <div class="col-sm-8">
                                    <div class="input-group">
                                        <input type="text" class="form-control" name="p_banner_img" id="p_banner_img" value="{$cat_info.p_banner_img}"> <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="BrowseServer('p_banner_img');">选择图片</button> </span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">栏目模板：</label>
                                <div class="col-sm-8">
                                    <select class="form-control" name="kind_template" id="">
                                    <option value=""></option>
                                    {volist name="template" id="kind_template"}
                                        <option value="{$kind_template.template}" {if $kind_template['template'] == $cat_info['kind_template']}selected=""{/if} >{$kind_template.template}.html {if $kind_template['text_info']}({$kind_template.text_info}){/if} </option>
                                    {/volist}
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">栏目文章模板：</label>
                                <div class="col-sm-8">
                                    <select class="form-control" name="art_template" id="">
                                    <option value=""></option>
                                    {volist name="template" id="art_template"}
                                        <option value="{$art_template.template}" {if $art_template['template'] == $cat_info['art_template']}selected=""{/if}>{$art_template.template}.html {if $art_template['text_info']}({$art_template.text_info}){/if}</option>
                                    {/volist}
                                    </select>
                                </div>
                            </div>

                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">栏目简介：</label>
                                <div class="col-sm-8">
                                    <textarea id="kind_info" name="kind_info" rows="2" cols="20">{$cat_info.kind_info}</textarea>
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">网页标题：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="web_title" minlength="2" type="text" value="{$cat_info.web_title}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">网页关键词：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="keywords" minlength="2" type="text" value="{$cat_info.keywords}" required="" aria-required="true">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">网页描述：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="description" minlength="2" type="text" value="{$cat_info.description}" required="" aria-required="true">
                                </div>
                            </div>
                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">栏目序号：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="sort_order" minlength="2" type="text" value="{$cat_info.sort_order}" required="" aria-required="true">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">列表文章数：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="art_num" minlength="2" type="text" value="{$cat_info.art_num}">
                                </div>
                            </div>
                            <div class="form-group" style="display:none;">
                                <label class="col-sm-2 control-label">列表文章数(手机)：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="p_art_num" minlength="2" type="text" value="{$cat_info.p_art_num}">
                                </div>
                            </div>
                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">其他属性：</label>
                                <div class="col-sm-8">
                                    <div class="col-sm-10">
                                        <label class="checkbox-inline i-checks">
                                            <input type="checkbox" name="is_hide" value="1" {if $cat_info['is_hide'] == 1}checked="checked"{/if}>隐藏栏目</label> 
                                        <label class="checkbox-inline i-checks" style="display:none;">
                                            <input type="checkbox" name="is_footer" value="1" {if $cat_info['is_footer'] == 1}checked="checked"{/if}>显示在底部</label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">栏目文章字段：</label>
                                <div class="col-sm-8">
                                    <div class="col-sm-10">
                                    {foreach name="article_group" item="v"}
                                        <label class="checkbox-inline i-checks">
                                            <input type="checkbox" name="article_field[]" value="{$v[0]}" {if in_array($v[0],$article_field)}checked="checked"{/if}>{$v[1]}
                                        </label>
                                    {/foreach}
                                    </div>
                                </div>
                            </div>
                           
                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">跳转地址：</label>
                                <div class="col-sm-8">
                                    <input class="configInput form-control" name="link_url" minlength="2" type="text" value="{$cat_info.link_url}" required="" aria-required="true">
                                </div>
                            </div>
                        </div>
                        <div id="tab-2" class="tab-pane">
                            
                            
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">手机Banner图片(英)：</label>
                                <div class="col-sm-8">
                                    <div class="input-group">
                                        <input type="text" class="form-control" name="kind_thumb" id="kind_thumb" value="{$cat_info.kind_thumb}"> <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="BrowseServer('kind_thumb');">选择图片</button> </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <input type="hidden" name="act" value="{$act}">
                                    <input type="hidden" name="kind_id" value="{$cat_info.kind_id}">
                                    <button class="btn btn-primary" onclick="ajax_submit_form('artkindFrom','{:url('Article/categoryHandle')}')" type="button">保存</button>
                                </div>
                            </div> 
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div> 
<script language="javascript">
<!--
KindEditor.ready(function(K) {
    K.create('#e_kind_info', {
        themeType : 'default',
        width : '100%',
        afterBlur:function(){this.sync();}
    });
    //简单模式初始化
    K.create('#kind_info', {
        width : '100%',
        resizeType : 1,
        allowPreviewEmoticons : false,
        allowImageUpload : false,
        items : [
            'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
            'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
            'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
        afterBlur:function(){this.sync();}
    });
});
-->
</script>
    
    <script> 
    //     $(document).ready(function () {
    //         editorReplace('kind_info');
    //         editorReplace('e_kind_info');
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    // });
    </script>
</body>
</html>
